package Abou.eCommerce.eCommerce.bo.impl;

import java.util.List;

import Abou.eCommerce.eCommerce.bo.CustomerBo;
import Abou.eCommerce.eCommerce.dao.CustomerDAO;
import Abou.eCommerce.eCommerce.entities.Customer;

public class CustomerBoImpl implements CustomerBo{
	 
	CustomerDAO customerDAO;
	//DI via Spring
	public void setCustomerDAO(CustomerDAO customerDAO) {
		this.customerDAO = customerDAO;
	}
 
	//call DAO to save customer
	public void addCustomer(Customer customer){
		customerDAO.addCustomer(customer);
	}
 
	//call DAO to return customers
	public List<Customer> listCustomer(){
		return customerDAO.listCustomer();
	}

	public CustomerDAO getCustomerDAO() {
		return customerDAO;
	}
}